package com.briup.day06;

/**
 * @author 谭梦寻
 * @version 1.1
 */
public class User {
    private String username;//成员变量
    private String tel;
    private String realName;
    private String name;
    private String email;
    private String password;

//    在程序外部 对于属性不能直接修改操作 但是能够获取

    public void setUsername(String username) {
        this.username = username;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUsername() {
        return username;
    }

    public String getTel() {
        return tel;
    }

    public String getRealName() {
        return realName;
    }

    public String getEmail() {
        return email;
    }

    public void setTel(String tel) {

        this.tel = tel;
    }
    public void setEmail(String em) {
        email = em; //成员变量可以在类的内部成员函数中直接使用
//        但是当成员变量和局部变量名重复时，一定要用this
    }

    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", tel='" + tel + '\'' +
                ", realName='" + realName + '\'' +
                ", name='" + name + '\'' +
                ", email='" + email + '\'' +
                '}';
    }
    
}
